package com.mumu.studykotlin.gra

/**
 *edie create on 2019/7/25
 *
 */
class Box<T>(t: T) {
    constructor(t: T, i: Int) : this(t)

    var x = t

    var box = Box(1)
}

interface Base {
    fun dodo()
}

class BaseImpl : Base {
    override fun dodo() {
        print("大哥")
    }
}

class BB(base: Base) : Base by base {
    fun play() {
        print("打篮球")

        fun compare(a: String, b: String): Boolean = a.length < b.length
    }

    val stringPlus0: (String, String) -> String = String::plus
    val stringPlus = String::plus
    val stringPlus1: (String, String) -> String = { s: String, other: Any? -> s.plus(other) }
    val stringPlus2: (String, String) -> String = { s: String, other: Any? -> s.plus(other) }

    val string55: String = "4"

    val sum = { x: Int, y: Int -> x + y }
}